//
//  BaoController.m
//  hehenianMobile
//
//  Created by huhmf on 15/7/25.
//  Copyright (c) 2015年 huihu. All rights reserved.
//

#import "BaoController.h"
//#import "ShareView.h"

#import "UIImage+MJ.h"



@interface BaoController() {
    

}



@end
@implementation BaoController


-(instancetype)init
{
    if (self=[super init]) {
        
        //        [self loadWebWithUrl:_link];
    }
    
    return self;
}


-(instancetype)initWithUrl:(NSString *)urlStr title:(NSString *)title
{
    _link=urlStr;
    self.link2 = urlStr;
    self.myTitle=title;
    self.tag = 1;
    self.headTag = 1;
    return [self init];
}


-(void)viewDidLoad
{
    [super viewDidLoad];

    if (_link) {
        [self loadWebWithUrl:_link];
    }
    
    
    //    [GetCoreI(IShareQuery) requestShareWithSign:@"activity" SuccBlock:^(ShareModel *share) {
    //        _shareModel=share;
    //    } failBLock:^{
    //        ShareModel *model=[ShareModel new];
    //        _shareModel=model;
    //        model.picUrl=@"";
    //        model.title=@"我正在使用钱生花APP进行理财，下载关注吧";
    //        model.content=@"钱生花是花样年集团倾力打造的互联网平台，为您提供安全、高收益的互联网理财服务";
    //        model.link=@"http://m.hehenian.com/about/scanCode.do";
    //    }];
}
-(void) loadWebView {
    
    [self loadWebWithUrl:_link];
}



-(void)viewWillAppear:(BOOL)animated
{
    
    
    if (self.navigationController.navigationBar.hidden) {
        [self.navigationController setNavigationBarHidden:NO animated:YES];
    }
    [super viewWillAppear:animated];
    //    [self loadWebWithUrl:_link];
    self.webView.scrollView.contentInset=UIEdgeInsetsMake(0, 0, 0, 0);

    [self setupNavigationBar];
}

-(void)setupNavigationBar
{
    if (self.myTitle.length>0) {
        self.navigationItem.title=self.myTitle;
    }

    
}






@end
